/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __PQ_Compiler_H__
#define __PQ_Compiler_H__

#define PLATFORM_WINDOWS 0
#define PLATFORM_UNIX    1
#define PLATFORM_APPLE   2
#define PLATFORM_INTEL   3
#define PLATFORM_LINUX   4

// Must be first (win 64 also define WIN32)
#if defined( _WIN64 )
#  define PLATFORM PLATFORM_WINDOWS
#elif defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 )
#  define PLATFORM PLATFORM_WINDOWS
#elif defined( __APPLE_CC__ )
#  define PLATFORM PLATFORM_APPLE
#elif defined( __INTEL_COMPILER )
#  define PLATFORM PLATFORM_INTEL
#elif defined( __LINUX__ )
#  define PLATFORM PLATFORM_LINUX
#else
#  define PLATFORM PLATFORM_UNIX
#endif

#define COMPILER_MSVC 0
#define COMPILER_GNU       1
#define COMPILER_BORLAND   2
#define COMPILER_INTEL     3

#ifdef _MSC_VER
#  define COMPILER COMPILER_MSVC
#elif defined( __BORLANDC__ )
#  define COMPILER COMPILER_BORLAND
#elif defined( __INTEL_COMPILER )
#  define COMPILER COMPILER_INTEL
#elif defined( __GNUC__ )
#  define COMPILER COMPILER_GNU
#else
#  pragma error "FATAL ERROR: Unknown compiler."
#endif

#if COMPILER == COMPILER_MSVC
#  pragma warning( disable : 4267 )// conversion from 'size_t' to 'int', possible loss of data
#  pragma warning( disable : 4786 )// identifier was truncated to '255' characters in the debug information

#pragma warning(disable : 4018)
#pragma warning(disable : 4819)
#pragma warning(disable : 4244)
#pragma warning(disable : 4305)
#pragma warning(disable : 4996)
#endif

#endif
